home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-09 | 2.5 KB | 117 lines | [TEXT/MPS ] |
- #### RezC.ALRT - Build rez input for alerts
- #### Writes into front window by default
- #### W.G. Powell 1988
-
- Set Exit 0
- Set rtyp 'ALRT'
- If {#} < 2
- Echo "### {0} Error: Bad arguments - use commando">>Dev:StdErr
- Exit 1
- End
- Set rid {1}
- Shift 1
- Echo -n "Resource ∂'{rtyp}∂' ({rid}"
- If "{1}" == "-nms"
- Set rname "{2}"
- If ( "{rname}" != "" )
- Echo -n ,∂""{rname}"∂"
- End
- Shift 2
- End
- If "{1}" == "-t"
- Set tr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-l"
- Set lr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-b"
- Set br {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-r"
- Set rr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-DITL"
- Set Ditln {2}
- Shift 2
- Else
- Echo "### {0} Error: DITL args out of order">>Dev:StdErr
- Exit 1
- End
-
- If ( "{1}" == "-sy" ) ; Echo -n ",SysHeap" ; Shift ; End
- If ( "{1}" == "-pu" ) ; Echo -n ",Purgeable" ; Shift ; End
- If ( "{1}" == "-lo" ) ; Echo -n ",Locked" ; Shift ; End
- If ( "{1}" == "-Pr" ) ; Echo -n ",Protected" ; Shift ; End
- If ( "{1}" == "-PL" ) ; Echo -n ",PreLoad" ; Shift ; End
- Echo ") ∂{"
- Echo "∂t∂{{tr},{lr},{br},{rr}∂},∂t∂t∂/* Window Rect *∂/"
- Echo "∂t{Ditln},∂t∂t∂t∂t∂/* DITL ID number *∂/"
- Set AllSame 1
- If "{1}" == "-as14"
- Set AllSame 0
- Shift
- End
- Set cnt 0
- Loop
- Set cnt `Evaluate {cnt} + 1`
- If ( (NOT {AllSame}) || ({cnt} == 1) )
- If "{1}" == "-V{cnt}"
- Set draw{cnt} ",visible"
- Else If "{1}" == "-I{cnt}"
- Set draw{cnt} ",invisible"
- Else
- Echo "### {0} Error: Stage {cnt} Draw arg">>Dev:StdErr
- Exit 1
- End
- If "{2}" == "-OK{cnt}"
- Set butn{cnt} "OK"
- Else If "{2}" == "-Can{cnt}"
- Set butn{cnt} "Cancel"
- Else
- Echo "### {0} Error: Stage {cnt} Butn arg">>Dev:StdErr
- Exit 1
- End
- If "{3}" == "-S0{cnt}"
- Set snd{cnt} ",silent"
- Else If "{3}" == "-S1{cnt}"
- Set snd{cnt} ",Sound1"
- Else If "{3}" == "-S2{cnt}"
- Set snd{cnt} ",Sound2"
- Else If "{3}" == "-S3{cnt}"
- Set snd{cnt} ",Sound3"
- Else
- Echo "### {0} Error: Stage {cnt} Sound arg">>Dev:StdErr
- Exit 1
- End
- Shift 3
- Else
- Set butn{cnt} "{butn1}"
- Set draw{cnt} "{draw1}"
- Set snd{cnt} "{snd1}"
- End
- Break If {cnt} >= 4
- End
- Echo "∂t∂{"
- Echo "∂t{butn4}{draw4}{snd4}; /* stage 4 */"
- Echo "∂t{butn3}{draw3}{snd3}; /* stage 3 */"
- Echo "∂t{butn2}{draw2}{snd2}; /* stage 2 */"
- Echo "∂t{butn1}{draw1}{snd1} /* stage 1 */"
- Echo "∂t∂}∂n∂};"
- Exit 0
- Echo {#} ≥≥Dev:StdErr